/* stylelint-disable selector-type-no-unknown */

@import './theme/index.less';
@import './mixins/index.less';

@media (prefers-color-scheme: light) {
  [data-color-mode='auto'][data-theme='dm'] {
    .dm-light();
  }
}

@media (prefers-color-scheme: dark) {
  [data-color-mode='auto'][data-theme='dm'] {
    .dm-dark();
  }
}

/* default theme */
:root,
page,
xhs-page,
.bui-default-light,
[data-color-mode='light'][data-theme='default'] {
  .light();
}

.bui-dark,
[data-color-mode='dark'][data-theme='default'] {
  .dark();
}

/** 大麦主题 */
.bui-dm-light,
[data-color-mode='light'][data-theme='dm'] {
  .dm-light();
}

/** 大麦主题 */
.bui-dm-dark,
[data-color-mode='dark'][data-theme='dm'] {
  .dm-dark();
}

@media (prefers-color-scheme: light) {
  [data-color-mode='auto'] {
    .light();
  }
}

@media (prefers-color-scheme: dark) {
  [data-color-mode='auto'] {
    .dark();
  }
}

/* set color-scheme */
:root,
page,
xhs-page,
[data-color-mode='light'] {
  color-scheme: light;
}

[data-color-mode='dark'] {
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  [data-color-mode='auto'] {
    color-scheme: light;
  }
}

@media (prefers-color-scheme: dark) {
  [data-color-mode='auto'] {
    color-scheme: dark;
  }
}

[data-color-mode] {
  color: var(--bui-color-fg-default);
  background-color: var(--bui-color-bg-default);
}
